﻿using System;
using com.cruxomatic.configuration;
using com.cruxomatic.configuration.FeatureManager;

public partial class Controls_QuickSearch : System.Web.UI.UserControl
{
    public string UserName { get; set; }
    public string Roles { get; set; }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            IFeatureManager featureManager = FeatureManagerFactory.GetFeatureManager();
            if (featureManager.IsFeatureSupported("QuickSearch"))
            {
                const string securityKey = "ef0rce!@##@!";
                txtJumpTo_Extender.ContextKey = string.Format("{0}|{1}|{2}", securityKey, UserName, Roles);
            }
            else
                pnlQuickSearch.Visible = false;
        }
    }
}